<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('技术案例库详情')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-technical-edit" th:object="${technicalCase}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">零件名称：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${technicalCase.partName}">
                    </div>

                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">故障模式：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${@dict.getLabel('sys_failure_mode', technicalCase.failureMode)}">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">失效信息：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${technicalCase.failureInfo}">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">材料牌号：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${technicalCase.materialBrand}">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">信息来源：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${technicalCase.informationSource}">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">故障原因：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${technicalCase.failureReason}">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">基本情况：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${technicalCase.basicSituation}">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">案例全文：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${technicalCase.caseFullText}">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">创建时间：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${#dates.format(technicalCase.createdAt, 'yyyy-MM-dd')}">
                    </div>

                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "technical/technical";
        $("#form-technical-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-technical-edit').serialize());
            }
        }

        $("input[name='createdAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='updatedAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>